<template>
  <div></div>
</template>
<script>
export default {
  name: 'Redirect',
  beforeRouteEnter(to, from, next) {
    next(vm => {
      // const { params } = that.$route
      // const { path } = params
      // console.log(to.path.split('redirect')[1], 'dasas')
      vm.$router.replace(to.path.split('redirect')[1])
      // 跳到该路由页面后，再替换为from.path来源路径
    })
  }
  // beforeCreate() {
  //   const { params, query } = this.$route
  //   const { path } = params
  //   console.log(path, 'pathtt')
  //   this.$router.replace({ path: '/' + path, query })
  // }
}
</script>
